# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-easygui
pkgver=0.98.1
pkgrel=3
pkgdesc='Python module for very simple, very easy GUI programming.'
url='https://easygui.readthedocs.io/'
license=('BSD')
arch=('any')
depends=('python2' 'tk')
makedepends=('python2-setuptools')
source=("https://github.com/robertlugg/easygui/archive/$pkgver.tar.gz")
sha256sums=('b46d1f06b85a2de2b15129906d21bb42bc66a6e800315fed57e634cf151fc083')

build() {
  cd "easygui-$pkgver"

  python2 setup.py build
}

package(){
  cd "easygui-$pkgver"

  python2 setup.py install --root="$pkgdir" --optimize=1

  install -dm 755 "$pkgdir/usr/share/licenses/$pkgname"
  sed -n '/LICENSE INFORMATION/,/"""/ p' setup.py > \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

